package com.example.demo04;

import cn.hutool.core.util.ClassUtil;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.handler.MultiDataPermissionHandler;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.schema.Table;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class CostomHandler implements MultiDataPermissionHandler {


    @Override
    public Expression getSqlSegment(Table table, Expression where, String mappedStatementId) {

        Class<?> clazz = ClassUtil.loadClass(mappedStatementId.substring(0, mappedStatementId.lastIndexOf(".")));
        log.info("clazz 名字:{}",clazz.getName());
        return null;
    }
}
